<?
/*if (!preg_match("#^(.+)\.(.+)\.(.+)$#",$_SERVER["HTTP_HOST"],$Out)){
    header('Location: http://www.'.$_SERVER["HTTP_HOST"].'/');
}else{*/
	//Iteration du Chrono
	include('Class/Root.class.php');
	include('Class/Debug/Chrono.class.php');
	$Chrono = new Chrono();
	$GLOBALS["Chrono"]=$Chrono;
	$Chrono->start();
  	$Chrono->start("CLASS LOAD");
	include('Class/Systeme/Sys.class.php');
	include('Class/Conf/Conf.class.php');
	include('Class/Debug/Klog.class.php');
	include('Class/Debug/Error.class.php');
	include('Class/Systeme/Module.class.php');
	include('Class/Systeme/Connection.class.php');
	include('Class/DataBase/DbAnalyzer.class.php');
	include('Class/DataBase/ObjectClass.class.php');
	include('Class/DataBase/Association.class.php');
	include('Class/DataBase/ObjectConst.class.php');
	include('Class/DataBase/genericClass.class.php');
	include('Class/DataBase/Drivers/mysqlDriver.class.php');
	include('Class/DataBase/Drivers/textDriver.class.php');
	include('Class/DataBase/Drivers/Flatfile.class.php');
	include('Class/Beacon/Beacon.class.php');
	include('Class/Beacon/Bloc.class.php');
	include('Class/Beacon/Condition.class.php');
	include('Class/Beacon/Info.class.php');
	include('Class/Beacon/Lib.class.php');
	include('Class/Beacon/Stats.class.php');
	include('Class/Beacon/Storproc.class.php');
	include('Class/Beacon/charUtils.class.php');
	include('Class/Beacon/editStruct.class.php');
	include('Class/Process/Process.class.php');
	include('Class/More.php');
  	$Chrono->stop("CLASS LOAD");
	function __autoload($className) {
		$folder=Root::classFolder($className);
		$GLOBALS["Chrono"]->start("TOTAL CLASS LOAD");
		$GLOBALS["Chrono"]->start("load ".$className);
		if($folder) require_once($folder.'/'.$className.'.class.php');
		$GLOBALS["Chrono"]->stop("TOTAL CLASS LOAD");
		$GLOBALS["Chrono"]->stop("load ".$className);
	}
	define('ROOT_DIR', dirname(__FILE__).'/');
	//Declaration des Classes PHP
	$GLOBALS['Systeme']=$Systeme;
	//Definition du lien par defaut
	$Systeme = new Sys();
	$Systeme->Connect();
	$Chrono->stop();
 	$Systeme->Log->log($Chrono->total());
	$Systeme->Affich();
	$Systeme->Close();
//}   
?>